public class Text6 {
    public static void main(String[] args) {
        int [] arr = {1,2,3,4,5};
        int [] newArr = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            //i是老数组的索引，也可以是新数组的索引
            newArr[i] = arr[i];
        }
        for (int i = 0; i < newArr.length; i++) {
            System.out.println(newArr[i]);
        }
    }
}
